1.0.23 • Published 4 years ago

field_name_helper v1.0.23

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Field Name Helpers

Introduction

Field Name helpers is a small library (for now ) just with two function. 1. nameGenerator(str, slices, idKey) - accepts three non mandatory arguments.

a)str - the string from to generate a field name

b) slices - array (indexed slices from the string) -example some long name -> slices would be 0,1,2 and result came case name someLongName

let name = "some name";
const modifiedName = nameGenerator(name,[],null)
modifiedName= "someName";
let longName = "This is really a long name";// we will take 3 indexed chunks
const longModifiedName = nameGenerator(longName, [2,4,5], null)
longModifiedName = 'reallyLongName'

if you leave the slices array empty it will create by default a name from the first two indexes of the string 2. uniqueFieldName(items) - accepts array of objects which must have as a key name.

Installation

npm install --save field_name_helper

Licence

This project is licensed under the terms of the MIT license.

1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago